|
DHTMLX Documentation |
grid.filterBy(column,value);
grid.filterBy(1,"alf");Or complex javascript rules:
grid.fitlerBy(1,function(data){Every next call of filterBy will reset the grid to its initial state and filter it from the start. There is the possibility to use the following additional parameters here:
return data.toString().indexOf("alf")!=-1; // true - show the related row , false - hide the related row
});
grid.filterBy(1,"alf");There is no way to use several filters with OR logic between them.
grid.filterBy(2,"Omega"); // the first rule will be ignored
grid.filterBy(1,"alf");
grid.filterBy(2,"Omega",true); // the grid will be filtered by both rules
<input id='some_el' type='text'>
....
grid.makeFilter("some_el",index); // will create a text filter linked to the specified column in the grid
<select id='some_el' type='text'></select> // the options of select will be added automatically
....
grid.makeFilter("some_el",index); // will create a select filter linked to the specified column in the grid
grid.refreshFilters(); // refresh lists of values in all the filters created by shortcuts or by makeFilter calls
grid.collectValues(index); // return alphabetically sorted list of unique values in a column